package com.fa4j.system.account.convert;


import com.fa4j.common.base.convert.CommonConvertor;
import com.fa4j.common.base.convert.ConverterConfig;
import com.fa4j.system.account.dto.AccountDTO;
import com.fa4j.system.account.model.Account;
import com.fa4j.system.account.model.AccountCreateCmd;
import com.fa4j.system.account.model.AccountModifyCmd;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(config = ConverterConfig.class)
public interface AccountConverter extends CommonConvertor<Account, AccountCreateCmd, AccountModifyCmd> {

    @Mapping(target = "accountId", source = "id")
    AccountDTO toDTO(Account account);


    List<AccountDTO> toDtoList(List<Account> accounts);
}
